Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(make): reinclude .git dir in docker builds #6723

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

dannykopping
Copy link
Contributor

@dannykopping dannykopping commented Jul 20, 2022

This was removed in #6691, but caused errors in docker builds

$ make loki-image
docker build -t grafana/loki:main-7f343d2 -f cmd/loki/Dockerfile .
Sending build context to Docker daemon  592.7MB
Step 1/15 : FROM golang:1.17.9 as build
 ---> b6bd03a3a78e
Step 2/15 : COPY . /src/loki
 ---> 0e56c7bfde79
Step 3/15 : WORKDIR /src/loki
 ---> Running in ab8ba59a2684
Removing intermediate container ab8ba59a2684
 ---> a0928aadd596
Step 4/15 : RUN make clean && make BUILD_IN_CONTAINER=false loki
 ---> Running in 0aa8fb6b893a
warning: Not a git repository. Use --no-index to compare two paths outside a working tree
usage: git diff --no-index [<options>] <path> <path>
...

We use the .git dir in the check-generated-files Make step.

This was removed in grafana#6691, but caused errors in docker builds

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping changed the title Reinclude .git dir in docker builds chore(make): reinclude .git dir in docker builds Jul 20, 2022
@dannykopping dannykopping marked this pull request as ready for review July 20, 2022 08:09
@dannykopping dannykopping requested a review from a team as a code owner July 20, 2022 08:09
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

A bit of a shame that we need it for the makefile, but I not an easy fix 🙂

@dannykopping dannykopping merged commit b8d260e into grafana:main Jul 20, 2022
@dannykopping dannykopping deleted the dannykopping/include-git branch July 20, 2022 08:18
lxwzy pushed a commit to lxwzy/loki that referenced this pull request Nov 7, 2022
This was removed in grafana#6691, but caused errors in docker builds

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants